﻿Imports DAO
Imports DTO
Public Class PhieuGoiTienBUS
    Public Function ThemPhieuGoiTien(ByVal pgtDTO As PhieuGoiTienDTO) As Integer
        Dim pgtDAO As New PhieuGoiTienDAO()
        Return pgtDAO.ThemPhieuGoiTien(pgtDTO)
    End Function
    'Lấy mã phieu goi max
    Public Function LayMaPhieuGoiMax() As Integer
        Dim pgtDAO As New PhieuGoiTienDAO()
        Return pgtDAO.LayMaGoiTienMax()
    End Function
    'Tim kiem phieu goi tien theo nhieu tieu chi
    Public Function TimKiemTheoNhieuTieuChi(ByVal pgtCrt As PhieuGoiTienCrt) As List(Of PhieuGoiTienCrt)
        Dim pgtDAO As New PhieuGoiTienDAO()
        Return pgtDAO.TimKiem(pgtCrt)
    End Function
    'Lay thong tin phieu goi tien theo ma phieu goi
    Public Function LayThongTinPhieuGoiTien(ByVal maphieugoi As Integer) As DataTable
        Dim pgtDAO As New PhieuGoiTienDAO()
        Return pgtDAO.LayThongTinPhieuGoi(maphieugoi)
    End Function
    'ham cap nhat phieu goi tien
    Public Function CapNhatPhieuGoiTien(ByVal pgtDTO As PhieuGoiTienDTO) As Integer
        Dim pgtDAO As New PhieuGoiTienDAO()
        Return pgtDAO.CapNhatPhieuGoiTien(pgtDTO)
    End Function

    Public Function LayThongTinDanhSachPhieuGui() As DataTable
        Dim dt As New DataTable()
        Dim pGoiTienDao As New PhieuGoiTienDAO()
        dt = pGoiTienDao.LayThongTinDanhSachPhieuGuiTien()
        Return dt
    End Function

    Public Function ImportDanhSachTuExcel(ByVal str As String) As DataTable
        Dim pgtDao As New PhieuGoiTienDAO()
        Return pgtDao.ImportDanhSachTuExcel(str)
    End Function

    Public Function TongThu(ByVal _date As Date)
        Dim pgtDAo As New PhieuGoiTienDAO()
        Return pgtDAo.TongThu(_date)
    End Function
End Class
